package com.supermarket.business.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.supermarket.business.domain.SupermarketSalesDetail;
import com.supermarket.common.annotation.AutoFill;
import com.supermarket.common.enums.OperationType;

import java.util.List;

/**
 * 销售明细Mapper接口
 * 
 * @author ruoyi
 * @date 2025-07-21
 */
public interface SupermarketSalesDetailMapper extends BaseMapper<SupermarketSalesDetail>
{
    /**
     * 查询销售明细
     * 
     * @param detailId 销售明细主键
     * @return 销售明细
     */
    public SupermarketSalesDetail selectSysSalesDetailByDetailId(Long detailId);

    /**
     * 查询销售明细列表
     * 
     * @param supermarketSalesDetail 销售明细
     * @return 销售明细集合
     */
    public List<SupermarketSalesDetail> selectSysSalesDetailList(SupermarketSalesDetail supermarketSalesDetail);

    /**
     * 新增销售明细
     * 
     * @param supermarketSalesDetail 销售明细
     * @return 结果
     */
    @AutoFill(value = OperationType.INSERT)
    public int insertSysSalesDetail(SupermarketSalesDetail supermarketSalesDetail);

    /**
     * 修改销售明细
     * 
     * @param supermarketSalesDetail 销售明细
     * @return 结果
     */
    @AutoFill(value = OperationType.UPDATE)
    public int updateSysSalesDetail(SupermarketSalesDetail supermarketSalesDetail);

    /**
     * 删除销售明细
     * 
     * @param detailId 销售明细主键
     * @return 结果
     */
    public int deleteSysSalesDetailByDetailId(Long detailId);

    /**
     * 批量删除销售明细
     * 
     * @param detailIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteSysSalesDetailByDetailIds(Long[] detailIds);
}
